
**APPENDIX TABLE 4 : Pvalues**

local mht = 1
local mht_pair = 1
local reps = 3000 //set reps for bootstrapping SE
log using "$out\OA-TableA4-Pvals.txt", text replace
log off

**  Business knowledge
	use "$data\followup_only.dta", clear
	gen A_EDT_elig=(A_EDT==1 & d_lleligible==1)
	gen A_EDT_no_elig=(A_EDT==1 & d_lleligible==0)
	gen nobt_ne_nolw = EDT_treat==0 & d_lleligible==0 & L_ttreat==0

	foreach var of varlist laxman_bus_knowledge_fu bus_literacy_index_q5 bus_literacy_index_q6 {
		log on
		reg `var' A_EDT_elig A_EDT_no_elig  B_LL C_EDT_LL nobt_ne_nolw female ///
			bl_bus_owner fu_dummy*, cl(co_code1)
		log off
		gen xbhat = _b[_cons] +  _b[female]*female + _b[fu_dummy1]*fu_dummy1 + ///
			_b[fu_dummy2]*fu_dummy2 + _b[fu_dummy3]*fu_dummy3 + ///
			_b[fu_dummy5]*fu_dummy5 + _b[fu_dummy6]*fu_dummy6 + ///
			_b[bl_bus_owner ]*bl_bus_owner
		gen `var'_res = `var' - xbhat
		drop xbhat
	}

	gen treat=.
	replace treat=1 if A_EDT==1 
	replace treat=2 if B_LL
	replace treat=3 if C_EDT_LL
	replace treat=0 if EDT_treat==0 & L_ttreat==0
	recode d_lleligible 0=2

	gen treatlong =.
	replace treatlong=1 if A_EDT==1 & d_lleligible == 1 & B_LL == 0 
	replace treatlong=2 if A_EDT==1 & d_lleligible == 2
	replace treatlong=3 if A_EDT==0 & d_lleligible == 1 & B_LL == 1 
	replace treatlong=4 if C_EDT_LL == 1
	replace treatlong=5 if A_EDT==0 & d_lleligible == 2 
	replace treatlong=0 if A_EDT==0 & d_lleligible == 1 & B_LL == 0 & treatlong ==.

	if `mht' > 0 {
		log on
		mhtexp laxman_bus_knowledge_fu_res bus_literacy_index_q5_res bus_literacy_index_q6_res, treatment(treatlong) bootstrap(`reps')
		log off
	}
	if `mht_pair' > 0 {
		log on
		mata: OnlyHyp = 1,1,4 \ 1,1,5 \ 1,1,6 \ 2,1,4 \ 2,1,5 \ 2,1,6 \ 3,1,4 \ 3,1,5 \ 3,1,6
		mhtexp laxman_bus_knowledge_fu_res bus_literacy_index_q5_res bus_literacy_index_q6_res, treatment(treat) subgroup(d_lleligible) combo("pairwise") only(OnlyHyp) bootstrap(`reps')
		log off
	}

**  Business practices
	use "$data\business_visit.dta", clear
	gen A_EDT_elig=(A_EDT==1 & d_lleligible==1)
	gen A_EDT_no_elig=(A_EDT==1 & d_lleligible==0)
	gen nobt_ne_nolw = EDT_treat==0 & d_lleligible==0 & L_ttreat==0

	** Treatment dummies for mhtexp
	gen treat=.
	replace treat=1 if A_EDT==1 
	replace treat=2 if B_LL
	replace treat=3 if C_EDT_LL
	replace treat=0 if EDT_treat==0 & L_ttreat==0
	recode d_lleligible 0=2

	gen treatlong =.
	replace treatlong=1 if A_EDT==1 & d_lleligible == 1 & B_LL == 0 
	replace treatlong=2 if A_EDT==1 & d_lleligible == 2
	replace treatlong=3 if A_EDT==0 & d_lleligible == 1 & B_LL == 1 
	replace treatlong=4 if C_EDT_LL == 1
	replace treatlong=5 if A_EDT==0 & d_lleligible == 2 
	replace treatlong=0 if A_EDT==0 & d_lleligible == 1 & B_LL == 0 & treatlong ==.

	foreach var of varlist purchase_on_credit record_sale_last_month record_money_taken record_practice {
		log on
		reg `var' A_EDT_elig A_EDT_no_elig  B_LL C_EDT_LL nobt_ne_nolw female fudummy* ///
			if (bus_basline ==1 & post==1), cl(co_code)
		log off
		gen xbhat = _b[_cons] +  _b[female]*female + _b[fudummy1]*fudummy1 + ///
			_b[fudummy2]*fudummy2 + _b[fudummy3]*fudummy3 + _b[fudummy5]*fudummy5 + ///
			_b[fudummy6]*fudummy6
		gen `var'_r = `var' - xbhat
		drop xbhat
	}

	keep if bus_basline==1 & post==1

	if `mht' > 0 {
		log on
		mhtexp purchase_on_credit_r record_sale_last_month_r record_money_taken_r record_practice_r, treatment(treatlong) bootstrap(`reps')
		log off
	}
	if `mht_pair' > 0 {
		log on
		mata: OnlyHyp = 1,1,4 \ 1,1,5 \ 1,1,6 \ 2,1,4 \ 2,1,5 \ 2,1,6 \ 3,1,4 \ 3,1,5 \ 3,1,6 \ 4,1,4 \ 4,1,5 \ 4,1,6
		mhtexp purchase_on_credit_r record_sale_last_month_r record_money_taken_r record_practice_r, treatment(treat) subgroup(d_lleligible) combo("pairwise") only(OnlyHyp) bootstrap(`reps')
		log off
	}

**  Busines operations
	foreach var of varlist bus_fixed all_months_operate index_busappearance  investmarketing bus_open_to_public secured_buyer_m biz_assets_pca_m {
		log on
		reg `var' A_EDT_elig A_EDT_no_elig  B_LL C_EDT_LL nobt_ne_nolw female fudummy* ///
			if (bus_basline ==1 & post==1), cl(co_code)
		log off
		gen xbhat = _b[_cons] +  _b[female]*female + _b[fudummy1]*fudummy1 + ///
			_b[fudummy2]*fudummy2 + _b[fudummy3]*fudummy3 + _b[fudummy5]*fudummy5 + ///
			_b[fudummy6]*fudummy6
		gen `var'_r = `var' - xbhat
		drop xbhat
	}

	if `mht' > 0 {
		log on
		mhtexp bus_fixed_r all_months_operate_r index_busappearance_r investmarketing_r bus_open_to_public_r secured_buyer_m_r biz_assets_pca_m_r, treatment(treatlong) bootstrap(`reps')
		log off
	}
	if `mht_pair' > 0 {
		log on
		mata: OnlyHyp = 1,1,4 \ 1,1,5 \ 1,1,6 \ 2,1,4 \ 2,1,5 \ 2,1,6 \ 3,1,4 \ 3,1,5 \ 3,1,6 \ 4,1,4 \ 4,1,5 \ 4,1,6 \ 5,1,4 \ 5,1,5 \ 5,1,6 \ 6,1,4 \ 6,1,5 \ 6,1,6 \ 7,1,4 \ 7,1,5 \ 7,1,6
		mhtexp bus_fixed_r all_months_operate_r index_busappearance_r investmarketing_r bus_open_to_public_r secured_buyer_m_r biz_assets_pca_m_r, treatment(treat) subgroup(d_lleligible) combo("pairwise") only(OnlyHyp) bootstrap(`reps')
		log off
	}


** Sales and profits
	foreach var of varlist log_good_month log_average_month log_bad_month lognov08sale logprofit_revised {
		log on
		reg `var' A_EDT_elig A_EDT_no_elig  B_LL C_EDT_LL nobt_ne_nolw female fudummy* ///
			if (bus_basline ==1 & post==1), cl(co_code)
		log off
		gen xbhat = _b[_cons] +  _b[female]*female + _b[fudummy1]*fudummy1 + ///
			_b[fudummy2]*fudummy2 + _b[fudummy3]*fudummy3 + _b[fudummy5]*fudummy5 + ///
			_b[fudummy6]*fudummy6
		gen `var'_r = `var' - xbhat
		drop xbhat
	}

	if `mht' > 0 {
		log on
		mhtexp log_good_month_r log_average_month_r log_bad_month_r lognov08sale_r logprofit_revised_r , treatment(treatlong) bootstrap(`reps')
		log off
	}
	if `mht_pair' > 0 {
		log on
		mata: OnlyHyp = 1,1,4 \ 1,1,5 \ 1,1,6 \ 2,1,4 \ 2,1,5 \ 2,1,6 \ 3,1,4 \ 3,1,5 \ 3,1,6 \ 4,1,4 \ 4,1,5 \ 4,1,6 \ 5,1,4 \ 5,1,5 \ 5,1,6 
		mhtexp log_good_month_r log_average_month_r log_bad_month_r lognov08sale_r logprofit_revised_r , treatment(treat) subgroup(d_lleligible) combo("pairwise") only(OnlyHyp) bootstrap(`reps')
		log off
	}
	
log close
